
package gov.chinatax.ctcps.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for zfzbJy.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="zfzbJyForm"
 */
public class ZfzbJyForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _hfjybh = null;
   private java.lang.String _nd = null;
   private java.lang.String _zffsDm = null;
   private java.lang.String _cfmxbh = null;
   private java.math.BigDecimal _zfxmjygs = null;
   private java.math.BigDecimal _zfxmsbgs = null;
   private java.math.BigDecimal _zfjyje = null;
   private java.math.BigDecimal _zfsbje = null;
   private java.lang.String _hfztbh = null;
   private java.lang.String _dwbh = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;

   /**
    * Standard constructor.
    */
   public ZfzbJyForm() {
   }

   /**
    * Returns the hfjybh
    *
    * @return the hfjybh
    */
   public java.lang.String getHfjybh() {
      return _hfjybh;
   }

   /**
    * Sets the hfjybh
    *
    * @param hfjybh the new hfjybh value
    */
   public void setHfjybh(java.lang.String hfjybh) {
      _hfjybh = hfjybh;
   }
   /**
    * Returns the nd
    *
    * @return the nd
    */
   public java.lang.String getNd() {
      return _nd;
   }

   /**
    * Sets the nd
    *
    * @param nd the new nd value
    */
   public void setNd(java.lang.String nd) {
      _nd = nd;
   }
   /**
    * Returns the zffsDm
    *
    * @return the zffsDm
    */
   public java.lang.String getZffsDm() {
      return _zffsDm;
   }

   /**
    * Sets the zffsDm
    *
    * @param zffsDm the new zffsDm value
    */
   public void setZffsDm(java.lang.String zffsDm) {
      _zffsDm = zffsDm;
   }
   /**
    * Returns the cfmxbh
    *
    * @return the cfmxbh
    */
   public java.lang.String getCfmxbh() {
      return _cfmxbh;
   }

   /**
    * Sets the cfmxbh
    *
    * @param cfmxbh the new cfmxbh value
    */
   public void setCfmxbh(java.lang.String cfmxbh) {
      _cfmxbh = cfmxbh;
   }
   /**
    * Returns the zfxmjygs
    *
    * @return the zfxmjygs
    */
   public java.math.BigDecimal getZfxmjygs() {
      return _zfxmjygs;
   }

   /**
    * Sets the zfxmjygs
    *
    * @param zfxmjygs the new zfxmjygs value
    */
   public void setZfxmjygs(java.math.BigDecimal zfxmjygs) {
      _zfxmjygs = zfxmjygs;
   }
   /**
    * Returns the zfxmsbgs
    *
    * @return the zfxmsbgs
    */
   public java.math.BigDecimal getZfxmsbgs() {
      return _zfxmsbgs;
   }

   /**
    * Sets the zfxmsbgs
    *
    * @param zfxmsbgs the new zfxmsbgs value
    */
   public void setZfxmsbgs(java.math.BigDecimal zfxmsbgs) {
      _zfxmsbgs = zfxmsbgs;
   }
   /**
    * Returns the zfjyje
    *
    * @return the zfjyje
    */
   public java.math.BigDecimal getZfjyje() {
      return _zfjyje;
   }

   /**
    * Sets the zfjyje
    *
    * @param zfjyje the new zfjyje value
    */
   public void setZfjyje(java.math.BigDecimal zfjyje) {
      _zfjyje = zfjyje;
   }
   /**
    * Returns the zfsbje
    *
    * @return the zfsbje
    */
   public java.math.BigDecimal getZfsbje() {
      return _zfsbje;
   }

   /**
    * Sets the zfsbje
    *
    * @param zfsbje the new zfsbje value
    */
   public void setZfsbje(java.math.BigDecimal zfsbje) {
      _zfsbje = zfsbje;
   }
   /**
    * Returns the hfztbh
    *
    * @return the hfztbh
    */
   public java.lang.String getHfztbh() {
      return _hfztbh;
   }

   /**
    * Sets the hfztbh
    *
    * @param hfztbh the new hfztbh value
    */
   public void setHfztbh(java.lang.String hfztbh) {
      _hfztbh = hfztbh;
   }
   /**
    * Returns the dwbh
    *
    * @return the dwbh
    */
   public java.lang.String getDwbh() {
      return _dwbh;
   }

   /**
    * Sets the dwbh
    *
    * @param dwbh the new dwbh value
    */
   public void setDwbh(java.lang.String dwbh) {
      _dwbh = dwbh;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getHfjybh() == null) {
         errors.add("hfjybh", new ActionError("error.hfjybh.required"));
      }
      if(getNd() == null) {
         errors.add("nd", new ActionError("error.nd.required"));
      }
      if(getZffsDm() == null) {
         errors.add("zffsDm", new ActionError("error.zffsDm.required"));
      }
      if(getCfmxbh() == null) {
         errors.add("cfmxbh", new ActionError("error.cfmxbh.required"));
      }
      if(getZfxmjygs() == null) {
         errors.add("zfxmjygs", new ActionError("error.zfxmjygs.required"));
      }
      if(getZfxmsbgs() == null) {
         errors.add("zfxmsbgs", new ActionError("error.zfxmsbgs.required"));
      }
      if(getZfjyje() == null) {
         errors.add("zfjyje", new ActionError("error.zfjyje.required"));
      }
      if(getZfsbje() == null) {
         errors.add("zfsbje", new ActionError("error.zfsbje.required"));
      }
      if(getHfztbh() == null) {
         errors.add("hfztbh", new ActionError("error.hfztbh.required"));
      }
      if(getDwbh() == null) {
         errors.add("dwbh", new ActionError("error.dwbh.required"));
      }
      // TODO test format/data
      return errors;
   }
}
